$(function () {
    $.ajax({
        url: '/blog',
        type: 'get',
        success: function (res) {
            
            var blogHtml = ''
            for (var i = 0; i < res.data.length; i++) {
                console.log(res.data);
                blogHtml += `
                <div class="item">
                <div class="item_warp">
                    <div class="item-l" style="background-image: url(${res.data[i].articles_img});">
                        <a href="">
                            <div>
                                <h2>${res.data[i].titles_name}</h2>
                                <p>${res.data[i].articles_field}</p>
                            </div>
                        </a>
                    </div>
                    <div class="itel-y">
                        
                    </div>
                </div>
            </div>
                `
                // $('.header-box .blog  .container .contation-x .article .item .item_warp .item-l').css({
                //     backgroundImage:url(`${res.data[i].articles_img}`)
                // })
               
            }

            var item = $('.header-box .blog .container .contation-x .article')
            item.html(blogHtml)
            
        }

    })
})